package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlavorMapper {
    /**
     * 批量插入口味数据
     * @param flavors
     */
    void saveBatch(@Param("flavors") List<DishFlavor> flavors);

    void deleteByDishid(@Param("dishIds") List<Long> dishIds);

    /**
     * 根据id查询口味数据
     * @param
     * @return
     */
    @Select("select * from dish_flavor where dish_id = #{dishId} ")
    List<DishFlavor> getByDishId(Long dishId);



}
